home *** CD-ROM | disk | FTP | other *** search
/ Aminet 50 / Aminet 50 (2002)(GTI - Schatztruhe)[!][Aug 2002].iso / Aminet / text / edit / tecoc-146.lha / singlp.c < prev    next >
C/C++ Source or Header  |  1991-07-05  |  1KB  |  38 lines

  1. /*****************************************************************************
  2.  
  3.     SinglP()
  4.  
  5.     This function performs the action of a single P command.  It must
  6.  
  7.     1.  write the edit buffer to the output file.
  8.     2.  clear the edit buffer
  9.     3.  read a page into the edit buffer
  10.  
  11. *****************************************************************************/
  12.  
  13. #include "zport.h"        /* define portability identifiers */
  14. #include "tecoc.h"        /* define general identifiers */
  15. #include "defext.h"        /* define external global variables */
  16. #include "dchars.h"        /* define identifiers for characters */
  17.  
  18. DEFAULT SinglP()        /* do a single P command */
  19. {
  20.     DBGFEN(2,"SinglP",NULL);
  21.  
  22.     if (WrPage(CurOut, EBfBeg, EBfEnd, FFPage) == FAILURE) {
  23.         DBGFEX(2,DbgFNm,"FAILURE, WrPage() failed");
  24.         return FAILURE;
  25.     }
  26.  
  27.     GapBeg = EBfBeg;        /* clear the... */
  28.     GapEnd = EBfEnd;        /* ...edit buffer */
  29.  
  30.     if (RdPage() == FAILURE) {
  31.         DBGFEX(2,DbgFNm,"FAILURE, RdPage() failed");
  32.         return FAILURE;
  33.     }
  34.  
  35.     DBGFEX(2,DbgFNm,"SUCCESS");
  36.     return SUCCESS;
  37. }
  38.